package com.syni.mdd.yhd.common.all.controller.api;

import com.syni.mdd.sjb.common.component.utils.common.utils.ResultMapHelper;
import com.syni.mdd.sjb.common.component.utils.common.annotations.CheckParams;
import com.syni.mdd.yhd.common.all.service.BmsBusinessAreaService;
import com.syni.mdd.yhd.common.all.service.api.AuroraPushService;
import com.syni.mdd.sjb.common.component.utils.common.utils.ParamsMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @className ApiAuroraPushController
 * @description TOO
 * @Author cfx
 * @DATE 2019/7/17 9:06
 * @VERSION 1.0
 **/
@RestController
@RequestMapping("/apiBusinessArea")
public class ApiBmsBusinessAreaController {
    @Autowired
    AuroraPushService auroraPushService;

    @Autowired
    BmsBusinessAreaService bmsBusinessAreaService;

    @PostMapping("/updateBmsInArea")
    @CheckParams(params = {"areaId"})
    public Map<String,Object> updateBmsInArea(@RequestBody ParamsMap paramsMap){
        Integer areaId = paramsMap.getInteger("areaId");
        bmsBusinessAreaService.updateBmsInArea(areaId);
        return ResultMapHelper.success();
    }



}
